import {
  CHANGE_LOADING,
  CHANGE_ANTHDATA
} from './mutation-types.js';
import {
  getAuthData
} from "../api/getData";
export default {
  async changeLoading({
    commit
  }, params) {
    await commit(CHANGE_LOADING, params)
  },
  async loadAuthSysData({ commit }) {
    try {
      const res = await getAuthData();
      if (res.error === 0) {
        commit(CHANGE_ANTHDATA, res.data)
      }
    } catch (error) {
      console.log(error)
    }
  }
}